package com.leyou.item.service;

import com.leyou.item.mapper.CategoryMapper;
import com.leyou.item.pojo.Category;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryService {

     @Autowired
     private CategoryMapper categoryMapper;

     public List<Category> queryListByParant(Long pid){
         Category category = new Category();
         category.setParentId(pid);
         return this.categoryMapper.select(category);
     }
}
